"""
author: Yanna
多线程执行自动化用例，提高效率
安装命令 pip install pytest-xdist
"""
import pytest
from time import sleep

'''
直接执行
4 passed in 8.05s 
用时8秒
'''
'''
终端输入 四个线程同时进行
pytest -vs -n=4 test-xdist.py
4 passed in 2.75s
'''
class TestCs:
    def test_01(self):
        sleep(2)
        assert 1 == 1

    def test_02(self):
        sleep(2)
        assert 1 == 1

    def test_03(self):
        sleep(2)
        assert 1 == 1

    def test_04(self):
        sleep(2)
        assert 1 == 1


